package com.fwixvye.mapper;

import com.fwixvye.pojo.Character;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fwixvye.pojo.Weapon;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 人物列表 Mapper 接口
 * </p>
 *
 * @author fwixvye
 * @since 2024-02-14
 */

@Mapper
public interface CharacterMapper extends BaseMapper<Character> {


    /**
     * @param character 插入角色的接口
     */
    @Insert("insert into `character`(name, characterStar, WeaponCategories, elementalType, hpB, atkB, defB, breakthroughBonus, breakthroughBonusType) " +
            "VALUES(#{name},#{characterStar},#{WeaponCategories},#{elementalType},#{hpB},#{atkB},#{defB},#{breakthroughBonus},#{breakthroughBonusType}) ")
    void characterAddData(Character character);

    @Select("select * from `character` where name = #{roleImgUrl}")
    Character selectAllByName(String roleImgUrl);
}
